<?php
/**
 * 基础设置
 */
namespace App;
defined('IN_IA') or exit('Access Denied');

class File extends Action
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 上传编辑器图片
     */
    public function uploadEditorImage()
    {
        load()->func('file');
        $_imgs = array();
        foreach($_FILES as $_k=>$_v){
            $_file = file_upload($_v,'image');
            $_imgs[] = tomedia($_file['path']);
        }
        $this->result(array('errno'=>0,'data'=>$_imgs));
    }
}